<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>cache</title>
	<style type="text/css">
	* {
		padding: 0;
		margin: 0;
	}
    </style>
</head>
<body>
	<div class="container">
		<h1>cache</h1>
	</div>
	<script src="https://cdn.staticfile.org/jquery/3.2.0/jquery.js"></script>
	<script type="text/javascript">
	class Cache {
		static data = {}

		static get(key) {
			return this.data[key] ;
		}
		static set(key, value) {
			this.data[key] = value
		}
	}

	let obj1 = {
		name: "后盾人",
		key : Symbol('缓存key'),
	}

	let obj2 = {
		name: '购物车',
		key : Symbol('缓存key'),
	}
	Cache.set(obj1.key, obj1)
	Cache.set(obj2.key, obj2)


	console.log('-----------------------\n')
	console.log(Cache.get(obj1.key))
	
	

	</script>
</body>
</html>